/**
 * Created by wangzhenning<wangzhenning@vcredit.com>.
 * Date: 2017/3/17
 */

public class SleepThread extends Thread {

    @Override
    public void run() {
        super.run();
        try {
            Thread.sleep(2000L);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        System.out.println("Thread.getcr ||"+Thread.currentThread().getName());
        System.out.println("this ||"+this.getName());
        System.out.println("this.getcr ||"+this.currentThread().getName());
        System.out.println(Thread.currentThread() == this.currentThread());


        Thread thread = Thread.currentThread();
        System.out.println(thread.getId());
        System.out.println(this.getId());
    }
}
